home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / master / Examples / Shared_Lib / init.c < prev    next >
C/C++ Source or Header  |  1994-02-01  |  412b  |  33 lines

  1.  
  2. /*
  3.  *  INIT.C
  4.  */
  5.  
  6. #include "defs.h"
  7.  
  8. Prototype void InitC(void);
  9. Prototype void UnInitC(void);
  10.  
  11. Prototype SignalSemaphore SemLock;
  12. Prototype List          StrList;
  13.  
  14. SignalSemaphore SemLock;
  15. List        StrList;
  16.  
  17. void
  18. InitC(void)
  19. {
  20.     NewList(&StrList);
  21.     InitSemaphore(&SemLock);
  22. }
  23.  
  24. void
  25. UnInitC(void)
  26. {
  27.     Node *node;
  28.  
  29.     while (node = RemHead(&StrList))
  30.     FreeMem(node, sizeof(Node) + strlen(node->ln_Name) + 1);
  31. }
  32.  
  33.